import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { ObjCreate } from "../../common/ObjCreate";
import { LoaderHelp } from "../../../../common/display/LoaderHelp";
import { ResFileConst } from "../../../resource/ResFileConst";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../../resource/ImagesConst";
type int = number;
//class NewBattlefieldSparkMiniCell
    
    export  class NewBattlefieldSparkMiniCell /* flash.display.Sprite */
    {
        constructor(arg1: string)
        {
            
            this._strImageName = arg1;
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            this._bmpBg = new Object /* flash.display.Bitmap */();
            this.addChild(this._bmpBg);
            this._bmpTxt = new Object /* flash.display.Bitmap */();
            this._bmpTxt.x = 9;
            this._bmpTxt.y = 10;
            this.addChild(this._bmpTxt);
            var loc1=GlobalStyle.textFormat6;
            loc1.align = flash.text.TextFormatAlign.RIGHT;
            this._tfNum = ObjCreate.createTextField("", 6, 30, 40, 18, this, loc1);
            LoaderHelp.addResCallBack(ResFileConst.newBFSparkMiniCell, this.onSparkComplete);
            return;
        }

        /* internal  */onSparkComplete(): void
        {
            this._bmpBg.bitmapData = GlobalClass.getBitmapData(ImagesConst.sparkMiniCellBg);
            this._bmpTxt.bitmapData = GlobalClass.getBitmapData(this._strImageName);
            return;
        }

        public updateLevel(arg1: int): void
        {
            this._tfNum.text = arg1.toString();
            return;
        }

        /* internal */ /* var */_strImageName: string;

        /* internal */ /* var */_bmpBg: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_bmpTxt: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_tfNum: Object /* flash.text.TextField */;
    }
